Fix the action test
authorMatthias Clasen <mclasen@redhat.com>
Thu, 19 Mar 2020 18:29:37 +0000 (14:29 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 19 Mar 2020 18:29:37 +0000 (14:29 -0400)
We have a test that enumerates the GtkText actions,
so when a new open appears, the test needs to be updated.

testsuite/gtk/action.c

index 23a78fa23e3c6f5b330d800d4c81dcbecb1b9d14..f15dce7ac16c76f3149241817004c4af6ac94914 100644 (file)
@@ -360,6 +360,7 @@ test_introspection (void)
   } expected[] = {
     { GTK_TYPE_TEXT, "text.undo", NULL, NULL },
     { GTK_TYPE_TEXT, "text.redo", NULL, NULL },
+    { GTK_TYPE_TEXT, "menu.popup", NULL, NULL },
     { GTK_TYPE_TEXT, "clipboard.cut", NULL, NULL },
     { GTK_TYPE_TEXT, "clipboard.copy", NULL, NULL },
     { GTK_TYPE_TEXT, "clipboard.paste", NULL, NULL },
@@ -378,9 +379,9 @@ test_introspection (void)
                                         &property))
     {
       g_assert (expected[i].owner == owner);
-      g_assert (strcmp (expected[i].name, name) == 0);
-      g_assert (g_strcmp0 (expected[i].params, params ? g_variant_type_peek_string (params) : NULL) == 0);
-      g_assert (g_strcmp0 (expected[i].property, property) == 0);
+      g_assert_cmpstr (expected[i].name, ==, name);
+      g_assert_cmpstr (expected[i].params, ==, params ? g_variant_type_peek_string (params) : NULL);
+      g_assert_cmpstr (expected[i].property, ==, property);
       i++;
     }
   g_assert (i == G_N_ELEMENTS (expected));